


// 主页面样式
body {
	margin:0;
	background:white;
	size:*; // spans all space left from toolbar and statusbar
}



// 主菜单样式
ul#menu-bar {
	font: system;
	behavior: menu-bar;
	flow: horizontal;
	color: windowtext;
	margin: 0;
	padding: 2dip;
	background: #ddd;
	
	var(menu-item-hover): #FEEEAE;
	var(menu-item-hover-border): #D9B526;
	var(menu-popup-back): #DCE6FB;
	var(menu-popup-border): #52668E;
}

// 主菜单按钮样式
ul#menu-bar > li {
	display: block;
	margin: 0 4dip 0 0;
	white-space: nowrap;
	width: max-intrinsic;
	display: block;
	flow: horizontal;
	border: 1dip solid transparent;
	padding: 3dip 16dip;
}

// 主菜单按钮悬停样式
ul#menu-bar > li:hover {
	background: color(menu-item-hover);
	border-color: color(menu-item-hover-border);
}

// 主菜单按钮选中样式
ul#menu-bar > li:current:owns-popup {  
	background-color: color(menu-popup-back);
	border-color: color(menu-popup-border);
}

// 主菜单弹出的子菜单
ul#menu-bar > li > menu {
	prototype: RootPopupMenu;
	border: 1dip solid color(menu-popup-back);
	margin-top: -1dip;
}

// 弹出式菜单样式
menu {
	font: system; font-rendering-mode:classic;
	behavior: menu; /*is a menu*/
	flow: vertical;
	display: none;
	margin: 0;
	padding: 1dip;
	max-width: max-intrinsic;
	/*min-width: max-intrinsic;*/
	border: 1dip solid color(menu-popup-back);
	background: color(menu-popup-back);
	color: windowtext;
	margin: 0; /* to offset it from parent li */
}

// 辅助弹出菜单
menu menu {
	max-width: max-intrinsic;
	border-color: color(menu-popup-border);
	margin: 0 1dip;
}

// 弹出菜单按钮
menu li {
	width: *;
	display: block;
	flow: horizontal;
	padding-left: 24dip; /* room for icon */
	padding-right: 12dip; /* room for the arrow */
	padding-top: 4dip;
	padding-bottom: 4dip;
	foreground-repeat: no-repeat;
	foreground-position: 2dip 50%;
	color: windowtext;
}
menu li:rtl {
	width: *;
	padding-right: 24dip; /* room for icon */
	padding-left: 12dip; /* room for the arrow */
	foreground-repeat: no-repeat;
	foreground-position-right: 2dip;
	foreground-position-top: 50%;
	text-align: right;
	color: windowtext;
}

// 禁用的弹出菜单按钮
menu li:disabled {
	color: graytext;
	foreground-image: none;
}

// 快捷键标签
menu li span.accesskey {
	display: block;
	width: max-intrinsic;
	white-space: nowrap;
	margin-left: *; /* spring to attach it to the right */
	padding-left: 1em;
	color: threedshadow;
}

// 选中的按钮快捷键标签
menu li:current span.accesskey {
	color: #FFD700;
}

// menu with single <menu> inside - submenu
menu li:has-child-of-type(menu) {
	foreground-image: url(stock:arrow-right); /* that arrow */
	foreground-repeat: no-repeat;
	foreground-position-top: 50%;
	foreground-position-left: auto;
	foreground-position-right: 4dip;
}
menu li:has-child-of-type(menu):rtl {
	foreground-image: url(stock:arrow-left); /* that arrow */
	foreground-repeat: no-repeat;
	foreground-position-right: auto;
	foreground-position-left: 4dip;
}

// 当前菜单项
menu li:hover:owns-popup, menu li:current {
	background: color(menu-item-hover);
	border-color: color(menu-item-hover-border);
}

// 菜单分隔符
menu hr {
	margin: 4dip;
}



// 工具栏样式
toolbar {
	display: block;
	flow: horizontal;
	background: #ccc;
	padding: 0 0 0 2dip;
}

// 工具栏按钮样式
toolbar > button {
	min-height: 36dip;
	min-width: 36dip;
	margin: 0 4dip 0 0;
	foreground-repeat: no-repeat;
	foreground-position: 50% 20%;
	foreground-size: 16dip;
}

// 工具栏按钮样式追加类 (仅图标)
toolbar > button.icononly {
	foreground-position: 50% 50%;
}

// 工具栏分割线样式
toolbar > br {
	padding: 0dip 0 36dip 6dip;
	margin: 4dip 0 4dip 6dip;
	border-left: 2dip solid;
	border-color: #AAA;
	font-size: 0;
}



// 状态栏样式
statusbar {
	display: block;
	flow: horizontal;
	background: #ddd;
}

// 状态栏标签样式
statusbar > span {
	padding: 4dip;
}

// 状态栏最后一个标签样式
statusbar > span:last-child {
	margin-left:*;
}



// 通用样式
.Hide { display:none; }


